package util;

import java.util.ArrayList;

import org.junit.Test;
import org.junit.Assert;

public class TestExtendSorter {

	@Test
	public void test() {
		ArrayList<Double> data = new ArrayList<Double>(100);
		for (int i = 0; i < 100; ++i) {
			data.add(Math.random());
		}

		ArrayList<Integer> sortedIndices = util.ExtendSorter.getIndiceAfterSorting(data);
		for (int i = 0; i < data.size() - 1; ++i) {
			Assert.assertTrue(data.get(sortedIndices.get(i + 1)) > data.get(sortedIndices.get(i)));
		}
	}
}
